package ru.papergames.controller.commands
{
	import org.puremvc.as3.interfaces.INotification;
	
	import ru.papergames.model.proxies.RegistrationProxy;
	import ru.papergames.model.vo.RegistrationVO;

	public class RegisterCommand extends BaseCommand
	{
		override public function execute(notification:INotification):void {
			super.execute(notification);
			
			var regVO:RegistrationVO = notification.getBody() as RegistrationVO;
			
			regProxy.call(RegistrationProxy.TRY_REGISTER, regVO.postObject);
		}		
		
		protected function get regProxy():RegistrationProxy {
			return this.getProxy(RegistrationProxy.NAME) as RegistrationProxy;
		}
		
	}
}